# CMakeLists.txt for stage3

# 设置库名称
set(LIBRARY_NAME stage3)

# 添加源文件
set(SOURCES
        stage3.cc
        flow_control_analysis.cc
        fill_candidate_datatypes.cc
        narrow_candidate_datatypes.cc
        forced_narrow_candidate_datatypes.cc
        print_datatypes_error.cc
        datatype_functions.cc
        lvalue_check.cc
        array_range_check.cc
        case_elements_check.cc
        constant_folding.cc
        declaration_check.cc
        enum_declaration_check.cc
        remove_forward_dependencies.cc
)
#target_include_directories(${LIBRARY_NAME} PRIVATE ${PROJECT_SOURCE_DIR} )
# 创建静态库
add_library(${LIBRARY_NAME} STATIC ${SOURCES})

# 设置编译选项（如有需要，可以从上一级CMakeLists.txt继承）

# 添加编译选项到目标库
target_compile_options(${LIBRARY_NAME} PRIVATE ${COMMON_CXX_FLAGS} ${COMMON_CXX_WARNINGS})
